package com.lyp.model.action;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

/**
 * Date: 2015/4/22  15:41
 *
 * @author lyp
 */
@Controller
public class Hello {
    @ResponseBody
    @RequestMapping(value = "/hello.do")
    public Map<String,Object> hello(HttpServletRequest request, HttpServletResponse response){
        Map<String,Object> map= new HashMap<String,Object>();
        try {
            map.put("msg", "hello");
        } catch (Exception e) {
            e.printStackTrace();
            map.put("success", false);
            return map;
        }
        return map;
    }
}
